Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AccountManager::linked_devices #300

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

Schmiddiii
Copy link
Contributor

This adds the functionality of decrypting DeviceInfo::name with the aci private key.

I'm unsure how much about this should live in libsignal-service-rs and how much in presage.
Feel free to suggest moving things around if needed.

See also whisperfish/presage#193.

@rubdos
Copy link
Member

rubdos commented Jun 3, 2024

I would say this should live in the account-manager, next to the encrypt method, and it should probably take an IdentityKeyPair to be slightly more type safe. Moving it into account-manager allows you to implement some round-trip tests too!

Moreover, then we can add a method in the account manager to retrieve devices, and execute the decryption in there. We probably want to provide the AciIdentityStore to such a method.

@Schmiddiii Schmiddiii force-pushed the decrypt-device-info branch from d2a0d98 to e873d07 Compare June 4, 2024 14:38
@Schmiddiii
Copy link
Contributor Author

I have moved the functionality to AccountManager as wanted and added AccountManager::linked_devices.

I did not do round-trip tests, as all they would check is serialization/deserialization of DeviceName works (which is not something to really check) and encrypt_device_name/decrypt_device_name to be inverse, which is already checked by tests.

@Schmiddiii Schmiddiii changed the title Add DeviceInfo::decrypt_device_name Add AccountManager::linked_devices Jun 4, 2024
@rubdos
Copy link
Member

rubdos commented Jun 7, 2024

LGTM

@rubdos rubdos merged commit 1e04a65 into whisperfish:main Jun 7, 2024
15 of 18 checks passed
@Schmiddiii Schmiddiii deleted the decrypt-device-info branch June 7, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants